New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-fontpath

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-fontpath

PostCSS plugin that adds a font-path attribute to @font-face which expands to the FontSpring syntax

0.3.0
Source
npm
Version published
Weekly downloads
5.8K
3.26%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS FontPath

NPM version Build Status Dependency Status

PostCSS plugin that adds a font-path attribute to @font-face which expands to the FontSpring syntax.

Part of Rucksack - CSS Superpowers.

/* Note: path must include base filename */
@font-face {
  font-family: 'My Font';
  font-path: '/path/to/font/file';
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'My Font';
  src: url("/path/to/font/file.eot");
  src: url("/path/to/font/file.eot?#iefix") format('embedded-opentype'),
       url("/path/to/font/file.woff") format('woff'),
       url("/path/to/font/file.ttf") format('truetype'),
       url("/path/to/font/file.svg") format('svg');
  font-weight: normal;
  font-style: normal;
}

--

Usage

postcss([ require('postcss-fontpath') ])

See PostCSS docs for examples for your environment.

--

Options

checkPath (boolean, default = false)

If true, the plugin will check if the path to the font file exists. When not found, the file is skipped in the output and a warning is logged.

--

License

MIT © Sean King

Keywords

postcss

FAQs

Package last updated on 26 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts